<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../print.css" type="text/css" media="print">
<meta content="MegaScroller,com.designmarco.ui.MegaScroller,ease,endPadding,steps,active,distance,checkSize,destroy,init,reset,scrollDown,scrollUp,setAxis,setProps" name="keywords">
<title>com.designmarco.ui.MegaScroller</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'MegaScroller - API Documentation';
				var baseRef = '../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">API Documentation</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../index-list.html')" href="../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../index.html?com/designmarco/ui/MegaScroller.html&amp;com/designmarco/ui/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;MegaScroller</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class MegaScroller"); titleBar_setSubNav(false,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">com.designmarco.ui</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class MegaScroller</td>
</tr>
</table>
<p></p>
  MegaScroller is a Powerful Ultra-Lightweight Scrolling Engine.
    <h2>Features:</h2>
  <ul>
  <li> Ultra-Smooth Scrolling Action</li>
  <li> Adds scrolling functionality to your pre-existing elelments</li>
  <li> Super-lightweight, adds only 1.6k to your swf</li>
  <li> Scroller can be moved and or resized without adverse effects</li>
  <li> Auto-Detect Horizontal or Vertical orientation</li>
  <li> Click anywhere on the track to scroll content </li>
  <li> Set number of clicks in order for the scroller to reach the end. </li>
  <li> Ability to scroll using keyboard arrows, as well as your MouseWheel</li>
  <li> Hide and Disable Controls when scrolling isn't neeeded.</li>
  </ul>
  <h3>MegaScroller requires passing the following five elements in through the Constructor.</h3>
  <ul>
  <li>Container</li>
  <li>Scroll Content</li>
  <li>Handle</li>
  <li>Track</li>
  <li>Viewport Mask</li>
  </ul>
  <h3>Optional Parameters</h3>
  <ul>
  <li>paused</li>
  <li>endPadding</li>
  <li>ease</li>
  <li>steps</li>
  </ul>
  <p></p>
<br>
<span class="label">Example</span>
<br>  <code>
  import com.designmarco.ui.MegaScroller;<br/>
  var scroller:MegaScroller = new MegaScroller(this, clip, handle, track, viewport, {steps:4, ease:0.2}); <br/>
  </code>
  <p></p>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#active">active</a> : Boolean<div class="summaryTableDescription">
   Determine MegaScroller State
   </div>
</td><td class="summaryTableOwnerCol">MegaScroller</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#distance">distance</a> : Number<div class="summaryTableDescription">[read-only]
   Distance Traveled in a Single Click.</div>
</td><td class="summaryTableOwnerCol">MegaScroller</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#ease">ease</a> : Number<div class="summaryTableDescription">  Amount of Scrolling Resistance  </div>
</td><td class="summaryTableOwnerCol">MegaScroller</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#endPadding">endPadding</a> : int<div class="summaryTableDescription"> Empty Space at the End of the Scroll Clip </div>
</td><td class="summaryTableOwnerCol">MegaScroller</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#steps">steps</a> : int<div class="summaryTableDescription"> Number of Clicks Needed to Scroll Entire Clip </div>
</td><td class="summaryTableOwnerCol">MegaScroller</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#MegaScroller()">MegaScroller</a>(holder:DisplayObject, clip:DisplayObject, handle:DisplayObject, track:DisplayObject, viewport:DisplayObject, props:Object = null)</div>
<div class="summaryTableDescription">
   MegaScroller Constructor
   </div>
</td><td class="summaryTableOwnerCol">MegaScroller</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#checkSize()">checkSize</a>():void</div>
<div class="summaryTableDescription">
   If scroll content becomes smaller than the viewport,
   hide and disable controls.</div>
</td><td class="summaryTableOwnerCol">MegaScroller</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#destroy()">destroy</a>():void</div>
<div class="summaryTableDescription">
   Clean-Up Method removes all MegaScroller references.</div>
</td><td class="summaryTableOwnerCol">MegaScroller</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#init()">init</a>():void</div>
<div class="summaryTableDescription">
   Initialize MegaScroller
   </div>
</td><td class="summaryTableOwnerCol">MegaScroller</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#reset()">reset</a>():void</div>
<div class="summaryTableDescription">
   Return MegaScroller to its
   original starting position
   </div>
</td><td class="summaryTableOwnerCol">MegaScroller</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#scrollDown()">scrollDown</a>():void</div>
<div class="summaryTableDescription">
   Scroll clip towards the end a single step.</div>
</td><td class="summaryTableOwnerCol">MegaScroller</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#scrollUp()">scrollUp</a>():void</div>
<div class="summaryTableDescription">
   Scroll clip towards the beginning a single step
   </div>
</td><td class="summaryTableOwnerCol">MegaScroller</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#setAxis()">setAxis</a>(value:String = null):void</div>
<div class="summaryTableDescription">
   Set MegaScroller Axis Orientation
   </div>
</td><td class="summaryTableOwnerCol">MegaScroller</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#setProps()">setProps</a>(value:Object):void</div>
<div class="summaryTableDescription">
   Set MegaScroller Properties
   </div>
</td><td class="summaryTableOwnerCol">MegaScroller</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="active"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">active</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>active:Boolean</code>&nbsp;&nbsp;[read-write]<p>
   Determine MegaScroller State
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get active():Boolean</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set active(value:Boolean):void</code>
<br>
</div>
<a name="distance"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">distance</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>distance:Number</code>&nbsp;&nbsp;[read-only]<p>
   Distance Traveled in a Single Click.
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get distance():Number</code>
<br>
</div>
<a name="ease"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">ease</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var ease:Number</code><p>  Amount of Scrolling Resistance  </p></div>
<a name="endPadding"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">endPadding</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var endPadding:int</code><p> Empty Space at the End of the Scroll Clip </p></div>
<a name="steps"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">steps</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var steps:int</code><p> Number of Clicks Needed to Scroll Entire Clip </p></div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="MegaScroller()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">MegaScroller</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function MegaScroller(holder:DisplayObject, clip:DisplayObject, handle:DisplayObject, track:DisplayObject, viewport:DisplayObject, props:Object = null)</code><p>
   MegaScroller Constructor
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">holder</span>:DisplayObject</code> &mdash;    Parent Container that Holds Everything
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">clip</span>:DisplayObject</code> &mdash;     Content Being Scrolled
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">handle</span>:DisplayObject</code> &mdash;    Travel path on scrollbar for handle to follow
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">track</span>:DisplayObject</code> &mdash;   Viewable Window that masks the content clip
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">viewport</span>:DisplayObject</code> &mdash;      Scrollbar Thumb Handle
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">props</span>:Object</code> (default = <code>null</code>)<code></code> &mdash;    Optional Properties: <br/>
           steps:int (default 5) - Amount of Clicks needed to scroll to the end. <br/>
           paused:Boolean (default false) - MegaScroller by default starts enabled, set paused:true to prevent starting immedietely.<br/>
           ease:Number (default 0.2) - A number between 0-1 representing the resistance present while scrolling. <br/>
           endPadding:int (default 50px) - Empty space at the the very end of the scroll content for padding.
                             axis:String - Manually set axis in order to override auto-detection.
   </td>
</tr>
</table>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="checkSize()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">checkSize</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public function checkSize():void</code><p>
   If scroll content becomes smaller than the viewport,
   hide and disable controls.
   </p></div>
<a name="destroy()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">destroy</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function destroy():void</code><p>
   Clean-Up Method removes all MegaScroller references.
   </p></div>
<a name="init()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">init</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function init():void</code><p>
   Initialize MegaScroller
   </p></div>
<a name="reset()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">reset</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function reset():void</code><p>
   Return MegaScroller to its
   original starting position
   </p></div>
<a name="scrollDown()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">scrollDown</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function scrollDown():void</code><p>
   Scroll clip towards the end a single step.
   </p></div>
<a name="scrollUp()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">scrollUp</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function scrollUp():void</code><p>
   Scroll clip towards the beginning a single step
   </p></div>
<a name="setAxis()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">setAxis</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function setAxis(value:String = null):void</code><p>
   Set MegaScroller Axis Orientation
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">value</span>:String</code> (default = <code>null</code>)<code></code> &mdash; "x" or "y"
   </td>
</tr>
</table>
</div>
<a name="setProps()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">setProps</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function setProps(value:Object):void</code><p>
   Set MegaScroller Properties
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">value</span>:Object</code></td>
</tr>
</table>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
